﻿using System;
using Emico.Data.Repository;

namespace Emico.Data.Entity.Repository
{
    public interface IRepositoryResolver
    {
        T ResolveRepository<T>(IDbContextWrapper wrapper) where T : IRepository;

        void RegisterRepository<To, TFrom>()
            where To : IRepository
            where TFrom : To;

        void RegisterRepository<T>(Func<IDbContextWrapper, T> resolve)
            where T : IRepository;
    }
}
